<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>样机清单</title>
		<link rel="stylesheet" href="css/reset.css" />
        <link rel="stylesheet" href="css/platform.css" />
        <link rel="stylesheet" href="css/table.css" />
        <link rel="stylesheet" href="js/magicsuggest-min.css" />
        <link rel="stylesheet" href="css/property.css" />
	</head>

	<body>
        <div class="header">
            <div class="u-title">样机清单</div>
        </div>
        <div class="prototype-list" ms-controller="mainController">
            <div class="u-multiform search-param">
			<div class="column">
				<div class="cell">
					<label><span>*</span>大区：</label>
					<div class="cnt-box">
						<input id="magicRegion" style="width: 250px;" type="text" />
					</div>
				</div>
				<div class="cell">
					<label>分公司：</label>
					<div class="cnt-box">
						<input id="magicBranch" style="width: 250px;" type="text" />
					</div>
				</div>
			</div>
			<div class="column">
				<div class="cell">
					<label>门店：</label>
                    <div class="cnt-box">
                        <input id="magicStore"  style="width:250px;" type="text"/>
                    </div>
				</div>
				<div class="cell">
					<label>商品编码：</label>
                        <input class="u-ipt" ms-duplex="commCode" />
				</div>
			</div>
			<div class="column">
				<div class="cell">
					<label>品类：</label>
					<div class="cnt-box">
						<input id="magicCategory" style="width: 250px;" type="text" />
					</div>
				</div>
				<div class="cell">
					<label>品牌：</label>
					<div class="cnt-box">
						<input id="magicBrand" style="width: 250px;" type="text" />
					</div>
				</div>
			</div>
			<div class="column">
				<div class="cell">
					<label>状态：</label>
					<div class="cnt-box">
						<input id="magicStatus" style="width: 250px;" type="text" />
					</div>
				</div>
			</div>
			<div class="column">
				<div class="cell"><button class="u-btn small" ms-click="search" ms-class="dis:!regionCode">查询</button></div>
				</div>
            </div>
            <div class="export">
                <button class="u-btn small" ms-class="dis:dataLen==0" ms-click="exportPop()">导出</button>    
            </div>
            <div id="listTable" ms-controller="listTable"></div>
            <script type="avalon" id="tableList">
                <div class="tableWrapper">
                    <table class="table">
                        <thead>
                            <tr>
								<th>门店编码</th>
								<th>门店名称</th>
                                <th>品类</th>
                                <th>品牌</th>
                                <th>商品编码</th>
                                <th>商品名称</th>
                                <th>库位</th>
                                <th>样机属性</th>
                                <th>样机数量</th>
								<th>状态</th>
								<th>更新时间</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ms-repeat-row="sources">
								<td>{{row.storeCode}}</td>
								<td>{{row.storeName | truncate(8,"...")}}</td>
                                <td>{{row.categoryName | truncate(8,"...")}}</td>
                                <td>{{row.brandName | truncate(8,"...")}}</td>
                                <td>{{row.commCode}}</td>
                                <td>{{row.commName}}</td>
                                <td>{{row.storage}}</td>
                                <td>{{row.modelProperty}}</td>
                                <td>{{row.modelCount}}</td>
								<td>{{row.newFlag==0?"老样机":"新样机"}}</td>
								<td>{{row.updateTime | date("yyyy-MM-dd HH:mm:ss")}}</td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="11">
                                    <div class="pager">
                                        <div class="first-page" ms-click="firstpage" ms-class={{firstpagestyle}}>首页</div>
                                        <div class="pre-page" ms-click="prepage" ms-class={{prepagestyle}}>上一页</div>
                                        <div class="current-page">
                                            第<input class="current-page-num" type="text" ms-duplex="currentpage" ms-input="jumppage" />页
                                            <span class="totalpage">共 {{totalpage}} 页</span>
                                        </div>
                                        <div class="next-page" ms-click="nextpage" ms-class={{nextpagestyle}}>下一页</div>
                                        <div class="last-page" ms-click="lastpage" ms-class={{lastpagestyle}}>尾页</div>
                                        <div class="messageinfo">{{startrow}}-{{endrow}} 共{{total}}条</div>
                                    </div>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </script>
              <a href="javascript:;" ms-click="showDownloadMonths()" style="margin-top:80px">样机详情</a>
              <table ms-if="showMonthload" class="table" style="margin-top:20px">
              	  <thead>
                            <tr>
								<th>时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ms-repeat-row="monthSources">
								<td>{{row.dowloadTime}}</td>
								<td>  <a href="javascript:;" ms-click="openDetail(row.dowloadTime)">打开列表</a></td>
                            </tr>
                        </tbody>
              	</table>
              	 <table ms-if="showDownload" class="table" style="margin-top:20px">
              	  <thead>
                            <tr>
								<th>时间</th>
								<th>序号</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ms-repeat-row="downloadSources">
                            		<td>{{row.dowloadTime}}</td>
								<td>{{row.dowloadIndex}}</td>
								<td>  <a href="javascript:;" ms-click="downloadIndex(row.dowloadUrl)">下载到本地</a></td>
                            </tr>
                        </tbody>
              	</table>
        </div>
        <div class="loadData"></div>
        <!--弹框区域-->
        <div ms-controller="popController">
            <div class="u-popup export-pop" id="popup_cnt">
                <div class="bg"></div>
                <div class="asTable-box">
                    <div class="asTable">
                        <div class="asTableCell">
                            <div class="asCell dialog" style="width:700px">
                                <a href="javascript:;" class="close btn-close">×</a>
                                <p class="title">选择导出</p>
                                <div class="container" style="width:660px">
                                    <div ms-repeat-number="exportCountList" class="e-number" ms-class="sel:$index==0" ms-click="selCount()" style="width:126px">
                                        <img src="css/images/export-icon.png">
                                        <p>{{number}}</p>
                                        <div class="sel-icon"></div>
                                    </div>
                                </div>
                                <div class="btn-box">
                                    <button class="u-btn" ms-click="exportList()">确定</button>
                                    <button class="u-btn gray btn-close">取消</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="js/jquery.min.js"></script>
        <script src="js/avalon.shim.sn.js"></script>
        <script src="js/swift-ui-table-1.1.js"></script>
        <script src="js/magicsuggest-min.js"></script>
        <script src="js/platform.js"></script>
        <script src="js/DataInterface/DataInterface.js"></script>
        <script src="js/prototype-list.js"></script>
    </body>

</html>
